The present invention generally relates to an apparatus for gravel packing or sand packing an annular space in a well such as the space between a sand screen or liner and a well casing or well bore with accurately sized gravel or sand. The gravel or sand is pumped down through a production tubing or drill string and diverted into the annular space by a hydraulically actuated means which diverts the fluid flow externally into the annular space and releases the run-in tool from the liner. The diverting and releasing means can be closed without removing the assembly from the well after injection of the gravel or sand in order to facilitate resumption of fluid production from the well. But, if necessary to remove the run-in tool from the well, this is easily accomplished because of the unique design and operation of the diverting and releasing means.